package com.wanmait.wisdom.manage.controller;

import com.wanmait.wisdom.entity.ResidentType;
import com.wanmait.wisdom.manage.service.ManageResidentTypeService;
import com.wanmait.wisdom.util.AjaxResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("manage")
public class ManageResidentTypeController {

    @Resource
    private ManageResidentTypeService manageResidentTypeService;

    @GetMapping("findAllResidentType")
    public AjaxResult findAllResidentType(){
       List<ResidentType> residentTypes =  manageResidentTypeService.findAllResidentType();
       return AjaxResult.success().put("residentTypes",residentTypes);
    }

}
